package com.bootdo.finance.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.finance.dao.ReclassificationDao;
import com.bootdo.finance.domain.ReclassificationDO;
import com.bootdo.finance.service.ReclassificationService;



@Service
public class ReclassificationServiceImpl implements ReclassificationService {
	@Autowired
	private ReclassificationDao reclassificationDao;
	
	@Override
	public ReclassificationDO get(Integer id){
		return reclassificationDao.get(id);
	}
	
	@Override
	public List<ReclassificationDO> list(Map<String, Object> map){
		return reclassificationDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return reclassificationDao.count(map);
	}
	
	@Override
	public int save(ReclassificationDO reclassification){
		return reclassificationDao.save(reclassification);
	}
	
	@Override
	public int update(ReclassificationDO reclassification){
		return reclassificationDao.update(reclassification);
	}
	
	@Override
	public int remove(Integer id){
		return reclassificationDao.remove(id);
	}
	
	@Override
	public int batchRemove(Integer[] ids){
		return reclassificationDao.batchRemove(ids);
	}


	@Override
	public boolean checkDeptHasUser(Integer deptId) {
		int result = reclassificationDao.getDeptUserNumber(deptId);
		return result == 0 ? true : false;
	}

}
